<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>东财分时资金图</title>
		<link href="css/text.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
			p {margin:0px;}
			#box{
				display:inline-block;
				margin:0px 5px 0px 80px;
				border-box:50%;
				width:10px;
				height:10px;
			}
			.fixedBox{
				border: 1px solid #555555;				
				
			}
			.fixedBox::-webkit-scrollbar {
				width: 10px;     
				height: 10px;				
			}								
		</style>		
		<script type="text/javascript" src="js/json2html.js"></script>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="DatePicker/WdatePicker.js"> </script>
		<script type="text/javascript" src="js/echarts.js"></script>
	</head>
	<body>
		<div id="towrite" class="fixedBox" style="display:none;">
			<div id="title" style="height:20px;"></div>
			<div id="chart" style="position:relative; float:left;margin-top:-5px;"></div>
			<!-- <div id="towrite1" class="fixedBox" style="position:relative; float:left;margin-top:-18px;"></div> -->
		</div>
				
		<script>			
			window.onload = function() {
				changeStyle();	
				getSource(jk);
						
			}		

			$(function() {
				setInterval(function() {									
					getSource(jk);																				
				},
				500);
			})
			
			function time_range(beginTime, endTime) {
				var strb = beginTime.split(":");
				if (strb.length != 2) {
					return false;
				}

				var stre = endTime.split(":");
				if (stre.length != 2) {
					return false;
				}

				var b = new Date();
				var e = new Date();
				var n = new Date();

				b.setHours(strb[0]);
				b.setMinutes(strb[1]);
				e.setHours(stre[0]);
				e.setMinutes(stre[1]);

				if (n.getTime() - b.getTime() > 0 && n.getTime() - e.getTime() < 0) {
					v = 1;					
					console.log(true)　　　　　　
					return true;				
				} else {
					console.log(false)
				    return false;     
				}
			}　　　
   　　　
			function changeStyle() {
				var div = document.getElementById("towrite");
				div.style.display= "block";
				div.style.left= "0px"; 				
				div.style.width= "100%";	
				div.style.height= "98%";		
				div.style.fontSize="12px";	
				
				var div1 = document.getElementById("chart");	
				div1.style.border= "1px solid #696969";				
				div1.style.left= "0px"; 
				div1.style.width= "98%";
				div1.style.height= "94%";	
				
				<!-- var div2 = document.getElementById("towrite1");					 -->
				<!-- div2.style.border= "1px solid #696969";				 -->
				<!-- div2.style.left= "0px"; 				 -->
				<!-- div2.style.width= "90%";	 -->
				<!-- div2.style.height= "30%";						 -->
			}
			
			Date.prototype.Format = function (fmt) {
				var o = {
				"M+": this.getMonth() + 1, //月份
				"d+": this.getDate(), //日
				"h+": this.getHours(), //小时
				"m+": this.getMinutes(), //分
				"s+": this.getSeconds(), //秒
				"q+": Math.floor((this.getMonth() + 3) / 3), //季度
				"S": this.getMilliseconds() //毫秒
				};
				if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
				for (var k in o)
				if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
				return fmt;
			};
			
			function keepTwoDecimal(num) {  
               var result = parseFloat(num);  
               if (isNaN(result)) {                     
                   return false;  
               }  
               result = Math.round(num * 100) / 100;  
               return result;  
			}	
			
			function NumberTransform(num) { 
				var result = num;
				if(Math.abs(num) > 100000000){
					result = num / 100000000;
					result = result.toFixed(0) + "亿";
				}else if(Math.abs(num) > 10000){
					result = num/10000;
					result = result.toFixed(0) + "万";
				}				   
				return result;  
			};	
			
			var z = 0;  //刷新
			var v = 0;	//刷新		
			var gpdm = "";
			var gpmc = "";
			var rq = "";
			var preClose = 0;	//昨收盘
			var jk = 0;  //默认是否显示竞价
			var jlr = "";
			function getSource(p) {					
				var u = decodeURI(window.location.href);								
				if(u.indexOf("##") > -1){
					var gp = u.split('##');				
					dm = gp[1];
					gpmc = gp[2];															
				}else{
					dm = "600000";
					gpmc = "浦发银行";					
				}
								
				if(dm != gpdm || v == 1 || p != jk){
					v = 0;
					jk = p;					
					gpdm = dm;					
					var dms = "";
					var dmt = "";
					if(dm.substr(0,1)=="6"){
						dms = "SH" + dm;
						dmt = "1." + dm;
					}else{
						dms = "SZ" + dm;
						dmt = "0." + dm;
					}
					
					if(dm == "999999"){
						dmt = "1.000001";
					}else if(dm.substr(0,3)=="399"){
						dmt = "0." + dm;
					}					
					
					//分时走势
					var url ="http://push2his.eastmoney.com/api/qt/stock/trends2/get?fields1=f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13&fields2=f51,f52,f53,f54,f55,f56,f57,f58&secid=" + dmt;						
					var res = [];
					$.ajax({
						type: "get",
						url: url,
						dataType: "json",
						async : false,
						cache:false,
						timeout:3000,					
						success: function(data) {
							//alert(JSON.stringify(data))						
							//document.write(JSON.stringify(data));
							preClose = data.data.preClose;
							var arr = data.data.trends;
							//document.write(JSON.stringify(arr));
							for (var i = 0; i < arr.length; i++){
								var aa = arr[i].split(',');	
								if(i == 0){
									rq = aa[0].split(" ")[0];
								}
								var time = aa[0].split(" ")[1];
								if(jk == 0){
									if(Number(time.replace(":","")) >= 930){
										var rc = {"time":aa[0].split(" ")[1],"open":Number(aa[1]),"close":Number(aa[2]),"high":Number(aa[3]),"low":Number(aa[4]),"vol":Number(aa[5]),"jprice":Number(aa[7])}								
										res.push(rc);
									}
								}else{
									var rc = {"time":aa[0].split(" ")[1],"open":Number(aa[1]),"close":Number(aa[2]),"high":Number(aa[3]),"low":Number(aa[4]),"vol":Number(aa[5]),"jprice":Number(aa[7])}								
									res.push(rc);								
								}		
							}								
						}
					});
					
					//分时资金
					var url1 = "https://push2.eastmoney.com/api/qt/stock/fflow/kline/get?cb=jQuery1123016706401424591832_1668777335401&lmt=0&klt=1&fields1=f1,f2,f3,f7&fields2=f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f62,f63,f64,f65&ut=b2884a393a59ad64002292a3e90d46a5&secid=" + dmt; 
					var res1 = [];
					$.ajax({
						type: "get",
						url: url1,
						dataType: "text",
						async : false,
						cache:false,
						timeout:3000,					
						success: function(data) {
							//alert(JSON.stringify(data))						
							//document.write(data);							
							var ss = data.replace(/ /g,",")
							ss = ss.match(/,"klines":(\S*)}}\);/)[1];							
							var arr =  JSON.parse(ss);								
							for (var i = 0; i < arr.length; i++){
								var aa = arr[i].split(',');
								var rc = {"rq":aa[0],"time":aa[1],"zljlr":Number(aa[2]),"xdjlr":Number(aa[3]),"zdjlr":Number(aa[4]),"ddjlr":Number(aa[5]),"cddjlr":Number(aa[6])};
								res1.push(rc);
							}															
						}
					});
					//document.write(JSON.stringify(res));
					//document.write("<br>"+rq + "<br>");
					//document.write(JSON.stringify(res1));
					for (var i = 0; i < res.length; i++){
						var t = res[i].time;
						//alert(t)
						var a = res1.findIndex((v) => {  //(findIndex)判断数组有无指定对象   
							return v.time ===  t;
						});
						if(a > -1){
							var arrfind = res1.find(function (item) {								
								return item.time == t
								//alert(1)
							});
							
							delete arrfind.rq;
							delete arrfind.time;
														
							$.extend(res[i], arrfind);
							//alert(JSON.stringify(res[i]))								
						}else{
							$.extend(res[i], {"zljlr":0,"xdjlr":0,"zdjlr":0,"ddjlr":0,"cddjlr":0});
						}
					}
					//document.write(JSON.stringify(res));
					var div = document.getElementById('title');
					var jj = '<a href="javascript:getSource(0);"  id="jj"  style="padding-left:20px;font-size:14px;">竞价</a>';										
					if(jk == 0){
						jj = '<a href="javascript:getSource(1);"  id="jj"  style="padding-left:20px;font-size:14px;">竞价</a>';						
					}
					div.innerHTML = '<font size="2">' + gpdm + "&nbsp;&nbsp;&nbsp;" + gpmc + "&nbsp;&nbsp;&nbsp;" + rq + jj +"</font>";
					
					var aObj = document.getElementById("jj");
					aObj.style.color = "#fff";
					if(jk == 1){
						aObj.style.color = "#00FFFF";
					}
					
					//当日资金
					var url2 = "http://push2.eastmoney.com/api/qt/ulist.np/get?cb=jQuery1123022062381139471432_1633842668576&fltt=2&secids=" + dmt +"&fields=f62,f184,f66,f69,f72,f75,f78,f81,f84,f87,f164,f165,f166,f167,f168,f169,f170,f171,f172,f173";
					var res2 = [];
					$.ajax({
						type: "get",
						url: url2,
						dataType: "text",
						async : false,
						cache:false,
						timeout:3000,					
						success: function(data) {
							//alert(JSON.stringify(data))						
							//document.write(data);														
							var ss = data.match(/,"diff":(\S*)}}\);/)[1];							
							res2 = JSON.parse(ss);							
						}
					});
					var zljlr = res2[0]["f62"];
					var zljb = res2[0]["f184"];					
					var cddjlr = res2[0]["f66"];
					var cddjb = res2[0]["f69"];					
					var ddjlr = res2[0]["f72"];
					var ddjb = res2[0]["f75"];					
					var zdjlr = res2[0]["f78"];
					var zdjb = res2[0]["f81"];					
					var xdjlr = res2[0]["f84"];
					var xdjb = res2[0]["f87"];
					
					<!-- var a1 = '<span id="box" style="background-color:#FFFF00"></span>'; -->
					<!-- var a2 = '<span id="box" style="background-color:#FF0000"></span>'; -->
					<!-- var a3 = '<span id="box" style="background-color:#FF00FF"></span>'; -->
					<!-- var a4 = '<span id="box" style="background-color:#00BFFF"></span>'; -->
					<!-- var a5 = '<span id="box" style="background-color:#008000"></span>'; -->
					<!-- var html = a1 + "<font>主力净比：<font>" + zljb + "%</font></font>" +					 -->
					<!-- a2 + "<font>超大单净比：<font>" + cddjb +  "%</font></font>" +  -->
					<!-- a3 + "<font>大单净比：<font>" + ddjb +  "%</font></font>" +  -->
					<!-- a4 + "<font>中单净比：<font>" + zdjb +  "%</font></font>" +  -->
					<!-- a5 + "<font>小单净比：<font>" + xdjb +  "%</font></font>"; -->
					
					jlr = ',主力净流入:' + NumberTransform(zljlr) +
						',超大单净流入:' + NumberTransform(cddjlr) + 
						',大单净流入:' + NumberTransform(ddjlr) +
						',中单净流入:' + NumberTransform(zdjlr) +
						',小单净流入:' + NumberTransform(xdjlr) + ',';
					GetChart(res);
				}else{
					z++;
					if(z == 60){
						z = 0;
						time_range("9:00","15:15")  //刷新数据
					}
				}	
			}
			
			function getParamValues(name, arr) {
				var ret = []
				var len = 256;	
				if(jk == 0){
					len = 241;
				}
				for (var i = 0; i < len; i++) {
					if(arr[i] != undefined){
						ret.push(arr[i][name])
					}else{
						ret.push(null)
					}
				}				
				return ret
			}
			
			function ratioCalculate(price, yclose) {  //涨跌幅
			  return ((price - yclose) / yclose * 100).toFixed(2);
			}
			
		</script>
		<script>			
			function GetChart(arr) {
				var res = getParamValues("close", arr);
				
				//过滤null
				var values = arr.map(function(o){
					return o.close;
				}).filter(function(val) {
					return val !== null
				});
				
				//alert(JSON.stringify(values))
				var maxa = Math.max(...values);
				var mina = Math.min(...values);
				var zfa = Math.abs((maxa / preClose - 1));
				var zfb = Math.abs((mina / preClose - 1));
				
				function min() {
					if(zfa >= zfb){
						return Number(preClose * (1 - zfa)).toFixed(2)
					}else{
						return mina
					}								
				}
				function max() {
					if(zfb >= zfa){
						return Number(preClose * (1 + zfb)).toFixed(2)
					}else{
						return maxa
					}
				}
				
				var _interval = ((preClose-min()) / 2);
				var jm = "09:30";
				if(jk == 0){
					jm = "";
				}
				
				var myChart = echarts.init(document.getElementById('chart'));
				const upColor = '#ec0000';//00da3c
				const downColor = '#00FFFF';//ec0000
				
				//分时走势区
				var top1 = 3;
				var left1 = 3;
				var right1 = 8;
				var height1 = 30;
				
				//成交量区			
				var top2 = 38;
				var top21 = top2 - 3;
				
				//资金流向区
				var top3 = 52;
				var top31 = top3 - 3;
				
				var option = {
					animation: false, //取消动画效果
					title: [
						{
							left: 'left',
							//text: '分时图'
						},
						{
							left: 'left',
							//text: '分时图'
						},
						{
							top: top21 + "%",
							left: 'left',
							text: '成交量',
							textStyle: {
								color: "#fff", // 文字的颜色。
								fontSize:'12',
							}
						},
						{
							top: top31 + "%",
							left: 'left',
							text: '资金流向',
							textStyle: {
								color: "#fff", // 文字的颜色。
								fontSize:'12',
							}
						}
					],					
					tooltip: {   //提示框
						trigger: 'axis',
						formatter(params) {  //添加文字	
							//alert(JSON.stringify(params))
							//document.write(JSON.stringify(params[0]));							
							var str = params[0].name + '<br>';
							if(params[0].name != "null"){
								params.forEach(item => {
									var name = item.seriesName;	
									var c = '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;left:5px;background-color:' + item.color + '"></span>';									
									if(name == "分时"){
										str += c + '价格:' + item.data + "<br>";
										str += c + '涨幅:' + ratioCalculate(item.data, preClose) + "%<br>";
									}else if(name == "分时均价"){
										str += c + '均价:' + item.data + "<br>";		
									}else if(name.indexOf("成交量") > -1){
										str += c + item.seriesName + " : " + item.data + "<br>";
									}else if(name.indexOf("净流入") > -1){
										str += c + item.seriesName + " : " + NumberTransform(item.data) + "<br>";
									}										
								});							
								return str;
							}
						}
					},
					legend:{   // 图例
						show: true,
						orient: 'horizontal',  //布局 默认横向布局'horizontal'，纵向布局’vertical’										
						type: "plain", // 图例的类型 'plain':普通图例  'scroll':可滚动翻页的图例
						zlevel: 1, // 所有图形的 zlevel 值。
						icon: "circle",  //控制形状  类型包括 circle 圆形，triangle 三角形，diamond 四边形，arrow 变异三角形，none 无
						top:  top31 + "%", // bottom:"20%" // 组件离容器的距离
						left: "9%", //left:"10%"  // // 组件离容器的距离         
						padding: 5, // 图例内边距	
						align: "auto", // 图例标记和文本的对齐
						itemGap: 30, // 图例每项之间的间隔。
						itemWidth: 15,     // 图例标记的图形宽度
						itemHeight: 12,      // 图例标记的图形高度// 使用字符串模板，模板变量为图例名称 {name}	
						formatter: function (item) {							
							if(item.indexOf("净流入") > -1){
								return item.substr(0,2) + jlr.split("," + item)[1].split(",")[0]
							}else{
								return "";
							}
						},
						data:['主力净流入','超大单净流入','大单净流入','中单净流入','小单净流入'],
						textStyle: {
							color: "#fff", // 文字的颜色。								
						}
					},				
					axisPointer: {   //上下区域连接
						link: [
							{
								xAxisIndex: 'all'
							}
						],
							label: {
							backgroundColor: '#777'
						}
					},
					grid: [
						{
							top: top1 + '%',
							left: left1 + '%',
							right: right1 + '%',
							height: height1 + '%'
						},
						{
							top: top1 + '%',
							left: left1 + '%',
							right: right1 + '%',
							height: height1 + '%'
						},
						{
							top: top2 + "%",
							left: left1 + '%',
							right: right1 + '%',						
							height: '10%'
						},
						{
							top: top3 + "%",
							left: left1 + '%',
							right: right1 + '%',						
							height: '33%'
						}
					],				
					xAxis: [
						{
							//type: 'category',
							gridIndex: 0,
							data: getParamValues("time", arr),
							axisLine: { show: false	}, //x轴坐标线设置		
							axisTick: { show: false },
							splitLine: { show: false },								
							axisLabel: { show: false },		
							<!-- axisPointer: {  //坐标指示器 -->
								<!-- z: 100     //控制图形的前后顺序。z 值小的图形会被 z 值大的图形覆盖。 -->
							<!-- } -->
						},
						{
							show: false,
							gridIndex: 1,
							data: getParamValues("time", arr),
							axisPointer: {
								show: false,								  
							}
						},
						{
							show: false,
							gridIndex: 2,
							data: getParamValues("time", arr),
						},						
						{
							type: 'category',								
							data: getParamValues('time', arr),
							gridIndex: 3,							
							axisLine:{  //x轴坐标线设置
								lineStyle:{
									type: 'dotted',   //坐标轴虚线（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
									color:"#C0C0C0",  //x轴坐标线颜色
									//width: 2   // 坐标轴线宽
								}
							},
							axisTick: {   //x轴刻度
								show:false, 
							},
							axisLabel:{	 //x轴标签设置	
								showMaxLabel:true, //显示最大 tick(最后一天)
								interval: 0,
								//padding: [0, 0, 0, 30],
								formatter: function (value, index) {
									var c = index % 15;
									if(value != "null" && c == 0){
										return value
									}									
								},
								textStyle:{  //x轴文字
									color:"#FFF"
								}
							},							
						}
					],					
					yAxis: [
						{
							type: 'value',
							gridIndex: 0,
							//position:'right',//坐标轴位置，移至右边
							//offset: 10,     //Y 轴相对于默认位置的偏移
							scale: true,   //刻度 自适应        
							splitArea: {     //分割区域颜色
								show: false  
							},	
							min: min(),							
							max: max(),							
							interval: _interval,							
							splitLine:{ //y轴网格线									
								show:false,								
								lineStyle: { 									
									color: '#808080',									 
									width: 1,    
									type: 'dashed', //（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisLine: { //y轴坐标线设置
								show: true,							
								lineStyle: { 									
									color: '#D3D3D3', //y轴颜色
									//width: 2,    // 坐标轴线宽
									type: 'dotted',     // 坐标轴线线的类型（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								}, 
							},
							axisLabel: {  //y轴标签设置
								show: true,  //是否显示	
								 color: function (val) {
									val = Number(val).toFixed(2);
									if (val == preClose) {
										return '#fff'
									}									
									return val > preClose ? '#FF8C00' : '#7FFFAA';
								  },														
								formatter: function (value){								
									return keepTwoDecimal(value)
								}
							}
						},
						{
							type: 'value',
							gridIndex: 1,
							position:'right',//坐标轴位置，移至右边
							offset: 10,     //Y 轴相对于默认位置的偏移
							scale: true,   //刻度 自适应        
							splitArea: {     //分割区域颜色
								show: false  
							},	
							min: min(),							
							max: max(),							
							interval: _interval,							
							splitLine:{ //y轴网格线									
								show:true,								
								lineStyle: { 									
									color: '#808080',									 
									width: 1,    
									type: 'dashed', //（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisLine: { //y轴坐标线设置
								show: true,							
								lineStyle: { 									
									color: '#D3D3D3', //y轴颜色
									//width: 2,    // 坐标轴线宽
									type: 'dotted',     // 坐标轴线线的类型（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								}, 
							},
							axisLabel: {  //y轴标签设置
								show: true,  //是否显示	
								color: function (val) {
									val = Number(val).toFixed(2);
									if (val == preClose) {
										return '#fff'
									}									
									return val > preClose ? '#FF8C00' : '#7FFFAA';
								},																							
								formatter: function (value) {
									var resul = ratioCalculate(value, preClose);
									return Number(resul).toFixed(2) + '%'
								}
							}
						},
						{
							gridIndex: 2,  //对应坐标轴所在grid的索引
							position:'right',//坐标轴位置，移至右边
							offset: 10,
							scale: true,							           
							splitNumber: 2,
							splitLine:{ //y轴网格线									
								show:true,
								lineStyle: { 									
									color: '#808080', 
									width: 1,    
									type: 'dotted', //（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisLine: { //y轴坐标线设置
								show: true,							
								lineStyle: { 									
									color: '#D3D3D3', //y轴颜色
									//width: 2,    // 坐标轴线宽
									type: 'dotted',     // 坐标轴线线的类型（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								}, 
							},
							axisLabel: {  //y轴标签设置
								show: true,  //是否显示														
								formatter: function (value){
									if(value != 0){							  
										return NumberTransform(value)
									}else{
										return 0
									}
								}
							}
						},
						{
							type: 'value',
							gridIndex: 3,
							position:'right',//坐标轴位置，移至右边
							offset: 10,     //Y 轴相对于默认位置的偏移
							min: function(value) {//取最小值向下取整为最小刻度									
								return Math.floor(value.min)
							},
							max: function(value) {//取最大值向上取整为最大刻度
								if(value.max < 0){
									return  0 
								}else{
									return  Math.ceil(value.max) 
								}									
							},
							interval: function (value) { // 刻度间隔
								if(value.max < 0){
									return  Math.ceil(value.min) 
								}else{
									return  Math.ceil(value.max)
								}									
							},								
							splitLine:{ //y轴网格线									
								show:true,
								lineStyle: { 								
									color: '#D3D3D3', 
									width: 1,    
									type: 'dotted', //（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisLine: { //y轴坐标线设置
								show: true, 									
								lineStyle: { 									
									color: '#D3D3D3', //y轴颜色
									//width: 2,    // 坐标轴线宽
									type: 'dotted',     // 坐标轴线线的类型（'solid'，实线类型；'dashed'，虚线类型；'dotted',点状类型）
								} 
							},
							axisTick: {   //y轴刻度
								show:false, 
							},
							axisLabel: {  //y轴标签设置
								show: true,
								color: '#fff',									
								formatter: function (value){
									if(value != 0){							  
										return NumberTransform(value)
									}else{
										return 0
									}
								}
							}
						}
					],
					<!-- dataZoom: [   //区间 -->
					<!-- { -->
					  <!-- type: 'inside', -->
					  <!-- xAxisIndex: [0, 1], -->
					  <!-- start: 0, -->
					  <!-- end: 100 -->
					<!-- }, -->
					<!-- { -->
					  <!-- show: true, -->
					  <!-- xAxisIndex: [0, 1], -->
					  <!-- type: 'slider', -->
					  <!-- top: '85%', -->
					  <!-- start: 0, -->
					  <!-- end: 100 -->
					<!-- } -->
				  <!-- ], -->
					series: [						
						{
							name: '分时',
							type: 'line',
							gridIndex: 0,
							xAxisIndex: 0,
							yAxisIndex: 0,
							data: getParamValues("close", arr),
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,//折线宽度
										color: "#D3D3D3"//折线颜色
									},
									color: '#D3D3D3',//拐点颜色							
								}							 
							},						 
							<!-- areaStyle: { -->
								<!-- normal: { -->
									<!-- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ -->
										<!-- offset: 0, -->
										<!-- color: 'rgba(0, 136, 212, 0.7)' -->
									<!-- }, { -->
										<!-- offset: 0.8, -->
										<!-- color: 'rgba(0, 136, 212, 0.02)' -->
									<!-- }], false), -->
									<!-- shadowColor: 'rgba(0, 0, 0, 0.1)', -->
									<!-- shadowBlur: 10 -->
								<!-- } -->
							<!-- },						  -->
							markLine:{   //增加标注线
								name:'昨日收盘价',
								symbol: ['none', 'none'],
								label:{
									show:false,
									formatter:  preClose,
									position: 'start',
								},
								lineStyle: {
									color: '#4289c5',
									type: 'solid'
								},
								data: [{
									yAxis: preClose							  
								}]
							}
						},
						{
							name: '分时均价',
							type: 'line',
							gridIndex: 0,
							xAxisIndex: 0,
							yAxisIndex: 0,
							data: getParamValues("jprice", arr),
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,//折线宽度
										color: "#EBEB00"//折线颜色
									},
									color: '#EBEB00',//拐点颜色							
								}							 
							}
						},				
						{
							name: '分时涨幅',
							type: 'line',
							gridIndex: 1,
							xAxisIndex: 1,
							yAxisIndex: 1,
							data: getParamValues("close", arr),
							smooth: true,
							symbol: "none",						 
							lineStyle: { //标线的样式 
								normal: {
									width: 0
								}
							},
							markLine:{ //增加标注线							    
								name:'竞价',
								symbol: ['none', 'none'],
								label:{
									show:false,							  
									position: 'start',
								},
								lineStyle: {
									color: '#fff',
									type: 'solid'
								},
								data: [{
									xAxis: jm							  
								}]
							}			
						},
						{
							name: '成交量',
							type: 'bar',
							gridIndex: 2,
							xAxisIndex: 2,
							yAxisIndex: 2,
							data: getParamValues("vol", arr),
							barWidth: 2,  //柱状图宽度
							itemStyle: {
								color: '#DAA520',							
							},
							markLine: {   //增加标注线
								name:'竞价',
								symbol: ['none', 'none'],
								label:{
									show:false,							  
									position: 'start',
								},
								lineStyle: {
									color: '#fff',
									type: 'solid'
								},
								data: [{
									xAxis: jm
								}]
							}
						},
						{							
							name: '主力净流入',
							data: getParamValues('zljlr', arr),							
							type: 'line',
							gridIndex: 3,
							xAxisIndex: 3,
							yAxisIndex: 3,							
							symbol: 'circle',//拐点样式‘circle’, ‘rect’, ‘roundRect’, ‘triangle’, ‘diamond’, ‘pin’, ‘arrow’ 
							symbolSize: 0,//拐点大小							
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,//折线宽度
										color: "#FFFF00"//折线颜色
									},
									color: '#FFFF00',//拐点颜色
									borderColor: '#fff',//拐点边框颜色
								}								
							},
							markLine:{ //增加标注线							    
								name:'竞价',
								symbol: ['none', 'none'],
								label:{
									show:false,							  
									position: 'start',
								},
								lineStyle: {
									color: '#fff',
									type: 'solid'
								},
								data: [{
									xAxis: jm						  
								}]
							}
						},
						{
							name: '超大单净流入',
							data: getParamValues('cddjlr', arr),
							type: 'line',
							gridIndex: 3,
							xAxisIndex: 3,
							yAxisIndex: 3,		
							symbolSize: 0,
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,
										color: "#FF0000"
									},
									color: "#FF0000",
								}
								<!-- emphasis: { -->
									<!-- color: '#FF0000' -->
								<!-- } -->
							}
						},
						{
							name: '大单净流入',
							data: getParamValues('ddjlr', arr),
							type: 'line',
							gridIndex: 3,
							xAxisIndex: 3,
							yAxisIndex: 3,		
							symbolSize: 0,
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,
										color: "#FF00FF"
									},
									color: "#FF00FF",
								}								
							}
						},
						{
							name: '中单净流入',
							data: getParamValues('zdjlr', arr),
							type: 'line',
							gridIndex: 3,
							xAxisIndex: 3,
							yAxisIndex: 3,		
							symbolSize: 0,
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,
										color: "#00BFFF"
									},
									color: "#00BFFF",
								}
							}
						},
						{
							name: '小单净流入',
							data: getParamValues('xdjlr', arr),
							type: 'line',
							gridIndex: 3,
							xAxisIndex: 3,
							yAxisIndex: 3,		
							symbolSize: 0,
							itemStyle: {
								normal: {
									lineStyle: {
										width: 2,
										color: "#008000"
									},
									color: "#008000",
								}
							}
						}
					]
				}					
				myChart.setOption(option);
				$(window).resize(myChart.resize);   //解决Echarts 隐藏再显示后宽度高度变小的问题
			}
		</script>
	</body>
</html>